'use strict';
/**
 * Created by FreezeSoul on 2015/9/27.
 */
define([
        'angular',
        'app/modules/editor/define'
    ],
    function(angular) {
        angular.module('ad.editor')
            .factory("adEditorSidebarService",function(){
                var menus = [];

                menus.push({
                    name: '数据管理',
                    type: 'toggle',
                    icon: 'fa fa-database',
                    isOpen: true,
                    pages: [{
                        name: '数据上传',
                        type: 'link',
                        state: 'editor.import'
                    },{
                        name: '字典管理',
                        type: 'link',
                        state: 'editor.dictionary'
                    },{
                        name: '模型管理',
                        type: 'link',
                        state: 'editor.schema.default'
                    },{
                        name: '数据集管理',
                        type: 'link',
                        state: 'editor.schema.dataset'
                    },{
                        name: '数据源管理',
                        type: 'link',
                        state: 'editor.source'
                    }]
                });

                menus.push({
                    name: '指标管理',
                    type: 'toggle',
                    icon: 'fa fa-bar-chart-o',
                    isOpen: true,
                    pages: [{
                        name: '指标管理',
                        type: 'link',
                        state: 'editor.index.search'
                    }, {
                        name: '页面管理',
                        type: 'link',
                        state: 'editor.page.search'
                    }]
                });

                menus.push({
                    name: '授权管理',
                    type: 'toggle',
                    icon: 'fa fa-user',
                    isOpen: true,
                    pages: [{
                        name: '角色管理',
                        type: 'link',
                        state: 'editor.role'
                    },{
                        name: '用户管理',
                        type: 'link',
                        state: 'editor.user'
                    }]
                });

                return {
                    menus: menus
                };
            })
    });